package org.vt.scheduleapp;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ToDoActivity extends Activity{

	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		setContentView(R.layout.create_todolist);

		//return button
		Button returnToMenu = (Button) findViewById(R.id.todoReturn);
		returnToMenu.setOnClickListener(new View.OnClickListener() {			
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(), ScheduleAppActivity.class);
				startActivityForResult(myIntent,0);
			}
		});
		
		//view button
		Button viewList = (Button) findViewById(R.id.todoView);		
		viewList.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) 
			{
				Intent myIntent = new Intent(v.getContext(), DisplayTodo.class);
				startActivityForResult(myIntent, 0);
			}
		});
		
		
		//add button
		Button addItem = (Button) findViewById(R.id.todoAddButton);
		addItem.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent myIntent = new Intent(v.getContext(), AddTodoListActivity.class);
				startActivityForResult(myIntent,0);
			}
		});
	}
}
